import { apiHttp } from '../../apiHttp';
import Api from '../../../api/cvs/cvsCorrectionController.api';
import { JsonResult, PageResult, CVSCorrectionCountInfoVo } from '../../../api/Interface';
import { CVSCorrectionSearchDto } from '../cvsInterface';
export default {
    // 获取CVS纠错列表页上方总计统计
    getCountInfo: async (): Promise<CVSCorrectionCountInfoVo> => {
        const res: JsonResult = await apiHttp(Api.getCountInfo);
        return res.data;
    },
     // 获取纠错列表
     cvsCorrectionPage: async (cvsUserInfo: CVSCorrectionSearchDto): Promise<PageResult> => {
        const res: JsonResult = await apiHttp(Api.CVSCorrectionPage, cvsUserInfo);
        return res.data;
    },
    // 根据纠错数据id进行修复操作
    updateStatus: async (id: number ): Promise<JsonResult> => {
        Api.updateStatus.url = '/cms/v2/api/cvs/correction?id={id}';
        const res: JsonResult = await apiHttp(Api.updateStatus, {id});
        return res;
    },
};